extends layout

block content
  div#main
    header#header
        a(href='/')
            h1 #{title}
        p #{description}
        h2(style="color:red;font-weight:bold;") 
            i.icon.fa-bullhorn 
            a(href='/static/about.html',target="_blank") 号外！留言上线啦
    section#thumbnails
            each val in data
                - var original = 'https://static.ioliu.cn/bing/'+val.qiniu_url+'_1920x1080.jpg';
                - var download = 'https://static.ioliu.cn/bing/'+val.qiniu_url+'_1920x1080.jpg';
                article(rid=val.id)
                    a.thumbnail.progressive(href= original)
                        img.progressive__img.progressive--not-loaded(data-progressive=val.smallpic,src=val.thumbnail )
                    h2 ##{val.date}# #{val.copyright}
                    p #{val.description}
                    - var url = 'http://service.weibo.com/share/share.php?url='+encodeURIComponent('http://bing.ioliu.cn?id='+val.id)+'&title='+encodeURIComponent('#必应壁纸# '+ val.date + ' / '+ val.description) + '&appkey=1833831541';
                    ul.actions
                        li
                            a.button.small(href=url,target="_blank",rel="nofollow") 分享
                        li 
                            a.button.small(href=val.copyrightlink,target="_blank",rel="nofollow") 搜索
                        li 
                            a.button.small(href=download,target="_blank") 下载

    - var prev = page.prev<=1?'/':'/?p='+page.prev;
    - var next = '/?p='+page.next;
    ul.actions.align-center
        li
            a.button.small(href=prev) &lt;&lt; 上页
            a.button.small(href=next) 下页 &gt;&gt;
    footer#footer
        ul.icons
            li
                a.icon.fa-github(href='https://github.com/xCss/bing',target="_blank",rel="nofollow")
                    span.label Github
            li
                a.icon.fa-weibo(href='http://weibo.com/BingPictures',target="_blank",rel="nofollow")
                    span.label Weibo
            li
                a.icon.fa-envelope(href='mail:xioveliu@gmail.com',target="_blank")
                    span.label Mail
        ul.copyright
            li 
                span.copy 2016 - 2017
                b &copy; 
                a(href='/') Bing Pictures.
